home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
-
- <xsl:output method="html"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
- <xsl:variable name="num_unread_feeds" select="count(opml/body/outline[@numUnread > 0])"/>
-
- <xsl:template match="opml">
-
- <xsl:variable name="rpt-title" select="head/title"/>
- <html>
- <head>
- <title><xsl:value-of select="$rpt-title"/></title>
- $INCLUDE(metatrans.inc)$
- <style type="text/css">
- $INCLUDE(surfer.css)$
-
- ul, ol { margin: 0; }
- li { font-size: 92%; vertical-align: middle; }
-
- #container {
- /* without this, content may be jumbled together when news item list shown */
- min-width: 600px;
- }
- .groupheader { padding-left: 24px; }
- #topposts, #summary-items, .feedlist, #tagcloud { margin: 24px 32px; }
-
- #column-sidebar {
- position: absolute;
- top: 0;
- right: 0;
- width: 350px;
- border-left: 1px dotted $COLOR-SIDEBAR-BORDER$;
- }
- #column-middle {
- position: absolute;
- top: 0;
- left: 0;
- padding-right: 350px;
- }
- #actionlinks {
- font-weight: normal;
- margin-top: 10px;
- border-top: 1px dotted $COLOR-SIDEBAR-BORDER$;
- padding-top: 10px;
- }
- #actionlinks li { list-style-type: none; }
- #actionlinks #httperrors {
- border-top: 1px dotted $COLOR-SIDEBAR-BORDER$;
- border-bottom: 1px dotted $COLOR-SIDEBAR-BORDER$;
- margin-top: 12px;
- padding: 3px 0;
- }
-
- div.toppost-title {
- font-weight: bold;
- margin-top: 12px;
- margin-bottom: 2px;
- }
- /* IE shows caret rather than hand pointer w/o this! */
- div.toppost-title a:hover {
- cursor: hand;
- }
- span.toppost-title-unread, span.toppost-title-read {
- max-width: 75%;
- overflow: hidden;
- display: inline-block;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- /* currently no difference between read/unread titles */
- .toppost-title-read { }
- .toppost-title-unread { }
-
- div.toppost-text {
- font-size: 92%;
- line-height: 1.4em;
- margin-bottom: 18px;
- }
- div.toppost-text a {
- /* don't allow hyperlink styles in the feed to set color/weight */
- color: $COLOR-HYPERLINK$ !important;
- font-weight: normal !important;
- }
-
- div#topvideos {
- text-align: center;
- margin-bottom: 18px;
- }
-
- img.videothumb {
- width: 60px;
- height: 45px;
- margin: 2px;
- background-image: url($IMAGEDIR$video-border.png);
- background-position: top left;
- background-repeat: repeat-y;
- padding-left: 8px;
- }
- a img.videothumb {
- border: 1px solid #3f3f3f;
- }
- /* highlight videos the user hasn't seen yet*/
- a:link img.videothumb { border-color: highlight; }
-
- div.showall {
- float: right;
- font-size: 85%;
- font-weight: bold;
- margin-right: 24px;
- }
-
- .task-box, .task-box-important { padding: 14px 18px; margin: 10px; }
- .task-box {
- color: $COLOR-SIDEBAR-FONT$;
- background-color: $COLOR-SIDEBAR$;
- border: 1px solid $COLOR-SIDEBAR-BORDER$;
- }
- .task-box-important {
- color: #b22222;
- background-color: #fae4e4;
- border: 1px solid #b22222;
- }
- .task-box-important a { color: #b22222; text-decoration: underline; }
- .task-text { text-align: center; font-size: 85%; }
-
- img.icon { margin-left: 4px; }
- img.newtabicon { vertical-align: top; }
- img.favicon { margin-right: 6px; zoom: 75%; }
-
- .feedlist {
- margin-top: 16px;
- }
- .feedlist li {
- /*list-style-type: none;*/
- padding-bottom: 2px;
- margin-left: 24px;
- }
- .feedtitle {
- overflow: hidden;
- display: inline-block;
- text-overflow: ellipsis;
- white-space: nowrap;
- max-width: 210px;
- }
- .feedlist .unreadcount { color: $COLOR-UNREAD-COUNT$; }
-
- span.tag { margin-right: 4px; }
- .cloud-rank0 { font-size: smaller; }
- .cloud-rank1 { }
- .cloud-rank2 { font-size: larger; font-weight: bold; }
- .tagcount { display: none; }
-
- div.groupheader a { text-decoration: underline; }
-
- .notags, .noattention, .notopposts {
- margin: 12px 20px;
- max-width: 300px;
- color: #A9A9A9;
- }
-
- form#searchbar {
- float: right;
- margin-right: 12px;
- }
- </style>
- </head>
- <body>
- <xsl:variable name="folderId" select="@folderId"/>
-
- <div id="pagehead">
- <!-- search form -->
- <!-- <form id="searchbar" method="get" action="fdaction:" title="$LANG_CONST(S_Action_Search)$">
- <input id="searchkeyword" size="30" type="text" maxlength="255" name="keyword" value="" />
- <input type="hidden" name="action" value="searchsubscriptions"/>
- </form> -->
- <div id="newspapertitle">
- <xsl:choose>
- <xsl:when test="$num_unread_feeds=0"><img src="$IMAGEDIR$subscriptions-lg.png" align="absmiddle" /></xsl:when>
- <xsl:otherwise><a href="fdaction:?action=markallfeedsread" title="$LANG_CONST(S_MarkAllFeedsRead)$"><img src="$IMAGEDIR$subscriptions-unread-lg.png" align="absmiddle" /></a></xsl:otherwise>
- </xsl:choose>
-
- <xsl:value-of select="$rpt-title"/>
- </div>
- </div>
- <div id="container">
- <div id="column-sidebar">
- <!-- tasks -->
- <xsl:if test="body/tasks">
- <xsl:for-each select="body/tasks/task">
- <xsl:variable name="taskboxclass">
- <xsl:choose>
- <xsl:when test="@isImportant">task-box-important</xsl:when>
- <xsl:otherwise>task-box</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div class="{$taskboxclass}"><div class="task-text"><xsl:value-of select="." disable-output-escaping="yes"/></div></div>
- </xsl:for-each>
- </xsl:if>
-
- <!-- summary -->
- <xsl:call-template name="showsummary"/>
- <!-- attention -->
- <xsl:call-template name="showattention"/>
- <!-- tag cloud -->
- <xsl:call-template name="showtagcloud"/>
- </div>
-
- <div id="column-middle">
- <!-- top posts (popular topics) -->
- <xsl:call-template name="showtopposts"/>
- </div>
- </div>
- </body>
- </html>
- </xsl:template>
- <!-- end main template -->
-
- <!-- ********************************************************************************************** -->
- <!-- summary template -->
- <!-- ********************************************************************************************** -->
- <xsl:template name="showsummary">
- <div class="groupheader"><!-- no group heading --></div>
-
- <div id="summary-items">
- <div>
- <a href="fdaction:?action=shownewspaper&filter=unread"><strong>$LANG_CONST(S_FilterName_Unread)$:</strong></a> <xsl:value-of select="counts/@numUnread"/>
- </div>
- <div>
- <a href="fdaction:?action=shownewspaper&filter=flagged"><strong>$LANG_CONST(S_FilterName_Flagged)$:</strong></a> <xsl:value-of select="counts/@numFlagged"/>
- </div>
- <ul id="actionlinks">
- <li><a href="fdaction:?action=searchsubscriptions&showdialog=1">$LANG_CONST(S_Action_Search)$...</a></li>
- <li><a href="fdaction:?action=runcleanup">$LANG_CONST(S_Action_Cleanup)$...</a></li>
- <xsl:choose>
- <xsl:when test="$IS-OFFLINE$!=0"><li><a href="fdaction:?action=toggleoffline">$LANG_CONST(S_Action_WorkOnline)$</a></li></xsl:when>
- <xsl:otherwise><li><a href="fdaction:?action=toggleoffline">$LANG_CONST(S_Action_WorkOffline)$</a></li></xsl:otherwise>
- </xsl:choose>
- <li><a href="fdaction:?action=showdinosaurs">$LANG_CONST(S_Action_ShowDinosaurs)$</a></li>
- <li><a href="fdaction:?action=viewfaq">$LANG_CONST(S_Action_ShowFAQ)$</a></li>
- <!-- add link to HTTP error report if any errors exist -->
- <xsl:if test="counts/@numHttpErrors">
- <li id="httperrors"><a href="fdaction:?action=showhttperrors">$LANG_CONST(S_Action_ShowHttpErrors)$:</a> <xsl:value-of select="counts/@numHttpErrors"/></li>
- </xsl:if>
- <!-- choose sync platform - only shown when not synching -->
- <xsl:if test="$SHOW_CHOOSE_SYNC_PLATFORM_LINK$=1">
- <li style="margin-top:20px;"><a href="fdaction:?action=choosesyncplatform">$LANG_CONST(S_Action_ChooseSyncPlatform)$</a></li>
- </xsl:if>
- </ul>
- </div>
- </xsl:template>
-
- <!-- ********************************************************************************************** -->
- <!-- tag cloud template -->
- <!-- ********************************************************************************************** -->
- <xsl:template name="showtagcloud">
- <div id="tag-container">
- <div class="groupheader">
- <div class="showall"><a href="fdaction:?action=managetags">$LANG_CONST(S_NewsLblManageTags)$</a></div>
- $LANG_CONST(S_NewsLblMyTags)$
- </div>
- <xsl:choose>
- <xsl:when test="cloud/tag">
- <div id="tagcloud">
- <xsl:for-each select="cloud/tag">
- <xsl:sort select="." data-type="text"/>
- <xsl:variable name="cloud-class">
- <xsl:choose>
- <xsl:when test="@rank=0">cloud-rank0</xsl:when>
- <xsl:when test="@rank=1">cloud-rank1</xsl:when>
- <xsl:otherwise>cloud-rank2</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <span class="tag">
- <a class="{$cloud-class}" href="fdaction:?action=showpostswithtag&tag={.}" title="$LANG_CONST(S_NewsHintShowTag)$ ({@count})">
- <xsl:value-of select="."/>
- </a>
- <span class="tagcount"> (<xsl:value-of select="@count"/>)</span>
- </span>
- </xsl:for-each>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <!-- no items have been tagged yet -->
- <div class="notags">
- <img src="$IMAGEDIR$tag.png" align="absmiddle" /> $LANG_CONST(S_NewsLblNoTags)$
- </div>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:template>
-
- <!-- ********************************************************************************************** -->
- <!-- attention template -->
- <!-- ********************************************************************************************** -->
- <xsl:template name="showattention">
- <!-- attention report skips feeds that the user hasn't been subscribed to for at least two days -->
- <xsl:variable name="nds_attention" select="body/outline[@attentionRank and (@collectAttention='true') and (@daysSubscribed > 1)]"/>
-
- <div id="attention-container">
- <xsl:choose>
- <xsl:when test="count($nds_attention)=0">
- <!-- show note about FD needing a few days to collect attention data -->
- <div class="groupheader">$LANG_CONST(S_AttentionInfoHdr)$</div>
- <div class="noattention">$LANG_CONST(S_AttentionInfo)$</div>
- </xsl:when>
- <!-- most attention -->
- <xsl:when test="$SHOW-MOST-ATTENTION$!=0">
- <div class="groupheader">
- <div class="showall"><a href="fdaction:?action=showattentionreport">$LANG_CONST(S_ShowAll)$</a></div>
- $LANG_CONST(S_NewsHdrFavoriteFeeds)$
- </div>
- <ol class="feedlist attention" id="most_attention">
- <xsl:for-each select="$nds_attention">
- <xsl:sort select="@attentionRank" data-type="number" order="descending"/>
- <xsl:if test="position() <= 10">
- <xsl:call-template name="feed"/>
- </xsl:if>
- </xsl:for-each>
- </ol>
- </xsl:when>
- <!-- least attention -->
- <xsl:when test="$SHOW-LEAST-ATTENTION$!=0">
- <div class="groupheader">
- $LANG_CONST(S_NewsHdrLeastFavoriteFeeds)$
- </div>
- <ol class="feedlist attention" id="least_attention">
- <xsl:for-each select="$nds_attention">
- <xsl:sort select="@attentionRank" data-type="number" order="ascending"/>
- <xsl:if test="position() <= 10">
- <xsl:call-template name="feed"/>
- </xsl:if>
- </xsl:for-each>
- </ol>
- </xsl:when>
- </xsl:choose>
- </div>
- </xsl:template>
-
- <!-- ********************************************************************************************** -->
- <!-- top posts/videos template -->
- <!-- ********************************************************************************************** -->
- <xsl:template name="showtopposts">
- <div class="groupheader">
- <div class="showall"><a href="fdaction:?action=populartopics">$LANG_CONST(S_ShowAll)$</a></div>
- $LANG_CONST(S_PopularTopics_Me)$
- </div>
- <div id="topposts">
- <xsl:if test="topVideos">
- <div id="topvideos">
- <xsl:for-each select="topVideos/video">
- <xsl:sort select="@dateSortKey" data-type="number" order="descending"/>
- <a href="{@url}" title="{@title}"><img class="videothumb" src="{@thumbnail}" /></a>
- </xsl:for-each>
- </div>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="topPosts">
- <xsl:for-each select="topPosts/post">
- <xsl:sort select="@dateSortKey" data-type="number" order="descending"/>
- <xsl:variable name="titleclass">
- <xsl:choose>
- <xsl:when test="read=0">toppost-title-unread</xsl:when>
- <xsl:otherwise>toppost-title-read</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div class="toppost-title">
- <!-- $FAVICON(<xsl:value-of select="@feedId"/>)$ -->
- <a href="fdaction:?action=gotopost&feedid={@feedId}&postid={@postId}&markpostread=1" title="{@title}">
- <span class="{$titleclass}"><xsl:value-of select="@title" disable-output-escaping="yes"/></span>
- </a>
- <a href="fdaction:?action=gotopostlink&newtab=1&feedid={@feedId}&postid={@postId}" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
- <img class="icon newtabicon" src="$IMAGEDIR$linknew.gif" align="absmiddle" />
- </a>
- </div>
- <div class="toppost-text">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </div>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <div class="notopposts">$LANG_CONST(S_NewsLblNoMemesShort)$</div>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:template>
-
- <!-- ********************************************************************************************** -->
- <!-- individual feed template -->
- <!-- ********************************************************************************************** -->
- <xsl:template name="feed">
- <li>
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:variable name="numunread" select="@numUnread"/>
- <xsl:variable name="numflagged" select="@numFlagged"/>
- <xsl:variable name="show-favicons" select="$SHOW-FAVICONS$"/>
-
- <xsl:variable name="feedclass">
- <xsl:choose>
- <xsl:when test="$numunread > 0 and $numflagged > 0">unread flagged</xsl:when>
- <xsl:when test="$numunread > 0">unread</xsl:when>
- <xsl:when test="$numflagged > 0">flagged</xsl:when>
- <xsl:otherwise>normal</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- feed favicon -->
- <xsl:if test="$show-favicons=1">$FAVICON(<xsl:value-of select="$feedId"/>)$</xsl:if>
-
- <!-- feed title -->
- <a class="feedtitle {$feedclass}" href="fdaction:?action=gotofeed&feedid={$feedId}" title="$LANG_CONST(S_NewsHintGotoFeed)$">
- <xsl:value-of select="@title" disable-output-escaping="yes"/>
- </a>
-
- <!-- unread count -->
- <xsl:if test="$numunread > 0">
- <span class="unreadcount"> (<xsl:value-of select="$numunread"/>)</span>
- </xsl:if>
- </li>
- </xsl:template>
-
- </xsl:stylesheet>